package com.ruoyi.ring.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 饮食记录对象 az_user_food_info
 * 
 * @author liuwp
 * @date 2025-09-04
 */
@Data
public class UserFoodInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 记录日期 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "记录日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date recordDate;

    /** 食物名称 */
    @Excel(name = "食物名称")
    private String foodName;

    /** 卡路里(千卡) */
    @Excel(name = "卡路里(千卡)")
    private BigDecimal calories;

    /** 蛋白质(g) */
    @Excel(name = "蛋白质(g)")
    private BigDecimal protein;

    /** 碳水化合物(g) */
    @Excel(name = "碳水化合物(g)")
    private BigDecimal carbohydrate;

    /** 脂肪(g) */
    @Excel(name = "脂肪(g)")
    private BigDecimal fat;

    /** 食物图片URL */
    @Excel(name = "食物图片URL")
    private String imageUrl;

    /** 食物描述 */
    @Excel(name = "食物描述")
    private String description;

    /** 健康计划卡路里 */
    @Excel(name = "健康计划卡路里")
    private Integer caloriesTotal;

    /** 蛋白质(g)（健康比例按计划卡路里算出） */
    @Excel(name = "蛋白质(g)", readConverterExp = "健=康比例按计划卡路里算出")
    private BigDecimal proteinTotal;

    /** 碳水化合物(g)（健康比例按计划卡路里算出） */
    @Excel(name = "碳水化合物(g)", readConverterExp = "健=康比例按计划卡路里算出")
    private BigDecimal carbohydrateTotal;

    /** 脂肪(g)（健康比例按计划卡路里算出） */
    @Excel(name = "脂肪(g)", readConverterExp = "健=康比例按计划卡路里算出")
    private BigDecimal fatTotal;

    private String mealType;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("recordDate", getRecordDate())
            .append("foodName", getFoodName())
            .append("calories", getCalories())
            .append("protein", getProtein())
            .append("carbohydrate", getCarbohydrate())
            .append("fat", getFat())
            .append("imageUrl", getImageUrl())
            .append("description", getDescription())
            .append("caloriesTotal", getCaloriesTotal())
            .append("proteinTotal", getProteinTotal())
            .append("carbohydrateTotal", getCarbohydrateTotal())
            .append("fatTotal", getFatTotal())
            .append("remark", getRemark())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
